package com.monster.controller;


import com.monster.entity.Result;
import com.monster.service.SetMealService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SetMealController {

    @Reference
    SetMealService setMealService;

    @GetMapping("web/setmeal/findAllSetmeal")
    public Result findAllSetmeal(){
        return new Result(setMealService.findAllSetmealForH5());
    }

    @GetMapping("web/setmeal/findSetMealDetail/{id}")
    public Result findSetMealDetail(@PathVariable("id") int id){
        return new Result(setMealService.findSetMealDetail(id));
    }

    @GetMapping("web/setmeal/findSetmealById/{id}")
    public Result findSetMeal(@PathVariable("id") int id){
        return new Result(setMealService.findSetMeal(id));
    }


}
